<?

// $Id: ProxyFactory.php,v 1.1.1.1 2005/03/03 04:53:22 icer Exp $
/**
 *
 * @package izz.proxy
 * @author BinzyWu 
 *
 */
include_once(dirname(__FILE__)."/PHP4ProxyFactory.php");

class ProxyFactory
{

	function &createProxy(&$handler, $objectType, $methods = null)
	{
		static $proxyfactory;
		if (!isset($proxyfactory))
		{
			if (version_compare(phpversion(), "5.0.0") >= 0)
			{
				//
				//include_once(dirname(__FILE__)."/PHP5ProxyFactory.php");
				//$proxyfactory = new PHP5ProxyFactory();

				// also php4 now
				return PHP4ProxyFactory::generate($handler, $objectType, $methods);
			}
			else
			{
				return PHP4ProxyFactory::generate($handler, $objectType, $methods);
			}
		}

	}

}



?>